﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using Teigha.Core;

namespace Teigha.TD
{
	public class OdDbLinkedTableData : OdDbLinkedData
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdDbLinkedTableData(IntPtr cPtr, bool cMemoryOwn) : base(TD_DbPINVOKE.OdDbLinkedTableData_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdDbLinkedTableData obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdDbLinkedTableData()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							TD_DbPINVOKE.delete_OdDbLinkedTableData(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public new static OdDbLinkedTableData cast(OdRxObject pObj)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDbLinkedTableData_cast(OdRxObject.getCPtr(pObj));
			OdDbLinkedTableData result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbLinkedTableData)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbLinkedTableData)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbLinkedTableData)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdRxClass desc()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDbLinkedTableData_desc(), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxClass isA()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDbLinkedTableData_isA(this.swigCPtr), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxObject queryX(OdRxClass protocolClass)
		{
			OdRxObject result = Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDbLinkedTableData_queryX(this.swigCPtr, OdRxClass.getCPtr(protocolClass)), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdDbLinkedTableData createObject()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDbLinkedTableData_createObject();
			OdDbLinkedTableData result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbLinkedTableData)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbLinkedTableData)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbLinkedTableData)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setSize(int nRows, int nCols)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_setSize(this.swigCPtr, nRows, nCols);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual int numColumns()
		{
			int result = TD_DbPINVOKE.OdDbLinkedTableData_numColumns(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual string getColumnName(int nIndex)
		{
			string result = TD_DbPINVOKE.OdDbLinkedTableData_getColumnName(this.swigCPtr, nIndex);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setColumnName(int nIndex, string name)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_setColumnName(this.swigCPtr, nIndex, name);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual int appendColumn(int nNumCols)
		{
			int result = TD_DbPINVOKE.OdDbLinkedTableData_appendColumn(this.swigCPtr, nNumCols);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual int insertColumn(int nIndex, int nNumCols)
		{
			int result = TD_DbPINVOKE.OdDbLinkedTableData_insertColumn(this.swigCPtr, nIndex, nNumCols);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void deleteColumn(int nIndex, int nNumColsToDelete)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_deleteColumn(this.swigCPtr, nIndex, nNumColsToDelete);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual int numRows()
		{
			int result = TD_DbPINVOKE.OdDbLinkedTableData_numRows(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual bool canInsert(int nIndex, bool bRow)
		{
			bool result = TD_DbPINVOKE.OdDbLinkedTableData_canInsert(this.swigCPtr, nIndex, bRow);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual int appendRow(int nNumRows)
		{
			int result = TD_DbPINVOKE.OdDbLinkedTableData_appendRow(this.swigCPtr, nNumRows);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual int insertRow(int nIndex, int nNumRows)
		{
			int result = TD_DbPINVOKE.OdDbLinkedTableData_insertRow(this.swigCPtr, nIndex, nNumRows);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual bool canDelete(int nIndex, int nCount, bool bRow)
		{
			bool result = TD_DbPINVOKE.OdDbLinkedTableData_canDelete(this.swigCPtr, nIndex, nCount, bRow);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void deleteRow(int nIndex, int nNumRowsToDelete)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_deleteRow(this.swigCPtr, nIndex, nNumRowsToDelete);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual bool isContentEditable(int nRow, int nCol)
		{
			bool result = TD_DbPINVOKE.OdDbLinkedTableData_isContentEditable(this.swigCPtr, nRow, nCol);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual CellState cellState(int nRow, int nCol)
		{
			CellState result = (CellState)TD_DbPINVOKE.OdDbLinkedTableData_cellState(this.swigCPtr, nRow, nCol);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setCellState(int nRow, int nCol, CellState nCellState)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_setCellState(this.swigCPtr, nRow, nCol, (int)nCellState);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual string getToolTip(int nRow, int nCol)
		{
			string result = TD_DbPINVOKE.OdDbLinkedTableData_getToolTip(this.swigCPtr, nRow, nCol);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setToolTip(int nRow, int nCol, string sToolTip)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_setToolTip(this.swigCPtr, nRow, nCol, sToolTip);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual int getCustomData(int nRow, int nCol)
		{
			int result = TD_DbPINVOKE.OdDbLinkedTableData_getCustomData__SWIG_0(this.swigCPtr, nRow, nCol);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setCustomData(int nRow, int nCol, int nData)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_setCustomData__SWIG_0(this.swigCPtr, nRow, nCol, nData);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual OdValue getCustomData(int nRow, int nCol, string sKey)
		{
			OdValue result = new OdValue(TD_DbPINVOKE.OdDbLinkedTableData_getCustomData__SWIG_1(this.swigCPtr, nRow, nCol, sKey), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setCustomData(int nRow, int nCol, string sKey, OdValue pData)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_setCustomData__SWIG_1(this.swigCPtr, nRow, nCol, sKey, OdValue.getCPtr(pData));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual uint numContents(int nRow, int nCol)
		{
			uint result = TD_DbPINVOKE.OdDbLinkedTableData_numContents(this.swigCPtr, nRow, nCol);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual uint createContent(int nRow, int nCol, int nIndex)
		{
			uint result = TD_DbPINVOKE.OdDbLinkedTableData_createContent(this.swigCPtr, nRow, nCol, nIndex);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void moveContent(int nRow, int nCol, int nFromIndex, int nToIndex)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_moveContent(this.swigCPtr, nRow, nCol, nFromIndex, nToIndex);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void deleteContent(int nRow, int nCol, uint nContent)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_deleteContent__SWIG_0(this.swigCPtr, nRow, nCol, nContent);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void deleteContent(int nRow, int nCol)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_deleteContent__SWIG_1(this.swigCPtr, nRow, nCol);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void deleteContent(OdCellRange range)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_deleteContent__SWIG_2(this.swigCPtr, OdCellRange.getCPtr(range));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual CellContentType contentType(int nRow, int nCol)
		{
			CellContentType result = (CellContentType)TD_DbPINVOKE.OdDbLinkedTableData_contentType__SWIG_0(this.swigCPtr, nRow, nCol);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual CellContentType contentType(int nRow, int nCol, uint nContent)
		{
			CellContentType result = (CellContentType)TD_DbPINVOKE.OdDbLinkedTableData_contentType__SWIG_1(this.swigCPtr, nRow, nCol, nContent);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void getDataType(int nRow, int nCol, out OdValue.DataType nDataType, out OdValue.UnitType nUnitType)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_getDataType__SWIG_0(this.swigCPtr, nRow, nCol, out nDataType, out nUnitType);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void getDataType(int nRow, int nCol, uint nContent, out OdValue.DataType nDataType, out OdValue.UnitType nUnitType)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_getDataType__SWIG_1(this.swigCPtr, nRow, nCol, nContent, out nDataType, out nUnitType);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setDataType(int nRow, int nCol, OdValue.DataType nDataType, OdValue.UnitType nUnitType)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_setDataType__SWIG_0(this.swigCPtr, nRow, nCol, (int)nDataType, (int)nUnitType);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setDataType(int nRow, int nCol, uint nContent, OdValue.DataType nDataType, OdValue.UnitType nUnitType)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_setDataType__SWIG_1(this.swigCPtr, nRow, nCol, nContent, (int)nDataType, (int)nUnitType);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual string dataFormat(int nRow, int nCol)
		{
			string result = TD_DbPINVOKE.OdDbLinkedTableData_dataFormat__SWIG_0(this.swigCPtr, nRow, nCol);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual string dataFormat(int nRow, int nCol, uint nContent)
		{
			string result = TD_DbPINVOKE.OdDbLinkedTableData_dataFormat__SWIG_1(this.swigCPtr, nRow, nCol, nContent);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setDataFormat(int nRow, int nCol, string sFormat)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_setDataFormat__SWIG_0(this.swigCPtr, nRow, nCol, sFormat);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setDataFormat(int nRow, int nCol, uint nContent, string sFormat)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_setDataFormat__SWIG_1(this.swigCPtr, nRow, nCol, nContent, sFormat);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual OdValue getValue(int nRow, int nCol)
		{
			OdValue result = new OdValue(TD_DbPINVOKE.OdDbLinkedTableData_getValue__SWIG_0(this.swigCPtr, nRow, nCol), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdValue getValue(int nRow, int nCol, uint nContent, OdValue.FormatOption nOption)
		{
			OdValue result = new OdValue(TD_DbPINVOKE.OdDbLinkedTableData_getValue__SWIG_1(this.swigCPtr, nRow, nCol, nContent, (int)nOption), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setValue(int nRow, int nCol, OdValue value)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_setValue__SWIG_0(this.swigCPtr, nRow, nCol, OdValue.getCPtr(value));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setValue(int nRow, int nCol, uint nContent, OdValue value)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_setValue__SWIG_1(this.swigCPtr, nRow, nCol, nContent, OdValue.getCPtr(value));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setValue(int nRow, int nCol, uint nContent, OdValue value, OdValue.ParseOption nOption)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_setValue__SWIG_2(this.swigCPtr, nRow, nCol, nContent, OdValue.getCPtr(value), (int)nOption);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual string getText(int nRow, int nCol)
		{
			string result = TD_DbPINVOKE.OdDbLinkedTableData_getText__SWIG_0(this.swigCPtr, nRow, nCol);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual string getText(int nRow, int nCol, uint nContent)
		{
			string result = TD_DbPINVOKE.OdDbLinkedTableData_getText__SWIG_1(this.swigCPtr, nRow, nCol, nContent);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual string getText(int nRow, int nCol, uint nContent, OdValue.FormatOption nOption)
		{
			string result = TD_DbPINVOKE.OdDbLinkedTableData_getText__SWIG_2(this.swigCPtr, nRow, nCol, nContent, (int)nOption);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setText(int nRow, int nCol, string sText)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_setText__SWIG_0(this.swigCPtr, nRow, nCol, sText);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setText(int nRow, int nCol, uint nContent, string sText)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_setText__SWIG_1(this.swigCPtr, nRow, nCol, nContent, sText);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual bool hasFormula(int nRow, int nCol, uint nContent)
		{
			bool result = TD_DbPINVOKE.OdDbLinkedTableData_hasFormula(this.swigCPtr, nRow, nCol, nContent);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual string getFormula(int nRow, int nCol, uint nContent)
		{
			string result = TD_DbPINVOKE.OdDbLinkedTableData_getFormula(this.swigCPtr, nRow, nCol, nContent);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setFormula(int nRow, int nCol, uint nContent, string sFormula)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_setFormula(this.swigCPtr, nRow, nCol, nContent, sFormula);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual OdDbObjectId getFieldId(int nRow, int nCol)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbLinkedTableData_getFieldId__SWIG_0(this.swigCPtr, nRow, nCol);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdDbObjectId getFieldId(int nRow, int nCol, uint nContent)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbLinkedTableData_getFieldId__SWIG_1(this.swigCPtr, nRow, nCol, nContent);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setFieldId(int nRow, int nCol, OdDbObjectId idField)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_setFieldId__SWIG_0(this.swigCPtr, nRow, nCol, OdDbObjectId.getCPtr(idField));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setFieldId(int nRow, int nCol, uint nContent, OdDbObjectId idField)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_setFieldId__SWIG_1(this.swigCPtr, nRow, nCol, nContent, OdDbObjectId.getCPtr(idField));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual OdDbField getField(int nRow, int nCol, uint nContent, OpenMode mode)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDbLinkedTableData_getField(this.swigCPtr, nRow, nCol, nContent, (int)mode);
			OdDbField result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbField)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbField)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbField)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdDbObjectId getBlockTableRecordId(int nRow, int nCol)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbLinkedTableData_getBlockTableRecordId__SWIG_0(this.swigCPtr, nRow, nCol);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdDbObjectId getBlockTableRecordId(int nRow, int nCol, uint nContent)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbLinkedTableData_getBlockTableRecordId__SWIG_1(this.swigCPtr, nRow, nCol, nContent);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setBlockTableRecordId(int nRow, int nCol, OdDbObjectId idBTR)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_setBlockTableRecordId__SWIG_0(this.swigCPtr, nRow, nCol, OdDbObjectId.getCPtr(idBTR));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setBlockTableRecordId(int nRow, int nCol, uint nContent, OdDbObjectId idBTR)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_setBlockTableRecordId__SWIG_1(this.swigCPtr, nRow, nCol, nContent, OdDbObjectId.getCPtr(idBTR));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual string getBlockAttributeValue(int nRow, int nCol, OdDbObjectId idAttDef)
		{
			string result = TD_DbPINVOKE.OdDbLinkedTableData_getBlockAttributeValue__SWIG_0(this.swigCPtr, nRow, nCol, OdDbObjectId.getCPtr(idAttDef));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual string getBlockAttributeValue(int nRow, int nCol, uint nContent, OdDbObjectId idAttDef)
		{
			string result = TD_DbPINVOKE.OdDbLinkedTableData_getBlockAttributeValue__SWIG_1(this.swigCPtr, nRow, nCol, nContent, OdDbObjectId.getCPtr(idAttDef));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setBlockAttributeValue(int nRow, int nCol, OdDbObjectId idAttDef, string sAttValue)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_setBlockAttributeValue__SWIG_0(this.swigCPtr, nRow, nCol, OdDbObjectId.getCPtr(idAttDef), sAttValue);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setBlockAttributeValue(int nRow, int nCol, uint nContent, OdDbObjectId idAttDef, string sAttValue)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_setBlockAttributeValue__SWIG_1(this.swigCPtr, nRow, nCol, nContent, OdDbObjectId.getCPtr(idAttDef), sAttValue);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual bool isLinked(int nRow, int nCol)
		{
			bool result = TD_DbPINVOKE.OdDbLinkedTableData_isLinked(this.swigCPtr, nRow, nCol);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdDbObjectId getDataLink(int nRow, int nCol)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbLinkedTableData_getDataLink__SWIG_0(this.swigCPtr, nRow, nCol);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdDbDataLink getDataLink(int nRow, int nCol, OpenMode mode)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDbLinkedTableData_getDataLink__SWIG_1(this.swigCPtr, nRow, nCol, (int)mode);
			OdDbDataLink result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbDataLink)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbDataLink)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbDataLink)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual int getDataLink(OdCellRange pRange, OdDbObjectIdArray dataLinkIds)
		{
			int result = TD_DbPINVOKE.OdDbLinkedTableData_getDataLink__SWIG_2(this.swigCPtr, OdCellRange.getCPtr(pRange), OdDbObjectIdArray.getCPtr(dataLinkIds));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setDataLink(int nRow, int nCol, OdDbObjectId idDataLink, bool bUpdate)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_setDataLink__SWIG_0(this.swigCPtr, nRow, nCol, OdDbObjectId.getCPtr(idDataLink), bUpdate);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setDataLink(OdCellRange range, OdDbObjectId idDataLink, bool bUpdate)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_setDataLink__SWIG_1(this.swigCPtr, OdCellRange.getCPtr(range), OdDbObjectId.getCPtr(idDataLink), bUpdate);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual OdCellRange getDataLinkRange(int nRow, int nCol)
		{
			OdCellRange result = new OdCellRange(TD_DbPINVOKE.OdDbLinkedTableData_getDataLinkRange(this.swigCPtr, nRow, nCol), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void removeDataLink(int nRow, int nCol)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_removeDataLink__SWIG_0(this.swigCPtr, nRow, nCol);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void removeDataLink()
		{
			TD_DbPINVOKE.OdDbLinkedTableData_removeDataLink__SWIG_1(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void updateDataLink(int nRow, int nCol, UpdateDirection nDir, UpdateOption nOption)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_updateDataLink__SWIG_0(this.swigCPtr, nRow, nCol, (int)nDir, (int)nOption);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void updateDataLink(UpdateDirection nDir, UpdateOption nOption)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_updateDataLink__SWIG_1(this.swigCPtr, (int)nDir, (int)nOption);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void clear()
		{
			TD_DbPINVOKE.OdDbLinkedTableData_clear(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void copyFrom(OdRxObject pSource)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_copyFrom__SWIG_0(this.swigCPtr, OdRxObject.getCPtr(pSource));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void copyFrom(OdDbLinkedTableData pSrc, TableCopyOption nOption)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_copyFrom__SWIG_1(this.swigCPtr, OdDbLinkedTableData.getCPtr(pSrc), (int)nOption);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void copyFrom(OdDbLinkedTableData pSrc, TableCopyOption nOption, OdCellRange srcRange, OdCellRange targetRange, OdCellRange pNewTargetRange)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_copyFrom__SWIG_2(this.swigCPtr, OdDbLinkedTableData.getCPtr(pSrc), (int)nOption, OdCellRange.getCPtr(srcRange), OdCellRange.getCPtr(targetRange), OdCellRange.getCPtr(pNewTargetRange));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdResult dwgInFields(OdDbDwgFiler pFiler)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbLinkedTableData_dwgInFields(this.swigCPtr, OdDbDwgFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void dwgOutFields(OdDbDwgFiler pFiler)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_dwgOutFields(this.swigCPtr, OdDbDwgFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdResult dxfInFields(OdDbDxfFiler pFiler)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbLinkedTableData_dxfInFields(this.swigCPtr, OdDbDxfFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void dxfOutFields(OdDbDxfFiler pFiler)
		{
			TD_DbPINVOKE.OdDbLinkedTableData_dxfOutFields(this.swigCPtr, OdDbDxfFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
